﻿<phone:PhoneApplicationPage
    x:Class="FullDemo.LocationSelectorPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:maps="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
   xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="Select location" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="TitleBox" Text="" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}"/>

            <TextBox x:Name="geoBox" Text=""/>
            <Button Content="Geo code" Click="GeoButton_Click" />
            <toolkit:PerformanceProgressBar x:Name="GeoProgress" IsIndeterminate="false"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">

            <maps:Map
                Name="map1"
                Center="60.22,24.81" 
                ZoomLevel="10" 
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
               LandmarksEnabled="True"
                >
            </maps:Map>
            <StackPanel x:Name="zoomPanel" Background="#77000000" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="211"  Width="52" Margin="0,0,0,60" >
                <Slider x:Name="zoomSlider" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Bottom" Height="201" Width="42" Minimum="1" Maximum="20" ValueChanged="zoomSlider_ValueChanged_1"  Margin="0,0,0,80"/>
            </StackPanel>

            <Grid Margin="12,0,12,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="50"/>
                </Grid.ColumnDefinitions>
                <Canvas Grid.Column="1">
                    <Ellipse x:Name="MylocDot" Stroke="Gray" Fill="Gray" Width="50" Height="50" MouseLeftButtonUp="myLocation_MouseLeftButtonUp"  Margin="0,10,0,5"></Ellipse>
                </Canvas>

            </Grid>

            <toolkit:ListPicker Background="#77000000" Visibility="Collapsed" x:Name="resultList"/>
        </Grid>


        <Grid x:Name="ButtPanel" Grid.Row="3" Margin="12,0,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition />
            </Grid.RowDefinitions>

            <Button x:Name="OkBut" Grid.Column="0" Content="Ok" Click="Button_Click" />
            <Button x:Name="CanCelBut" Grid.Column="1" Content="Cancel" Click="Button_Click" />
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>